#coding=utf-8
#Boa:FramePanel:PanelReportMonth

import wx

from MyListCtrl import MyListCtrlSaleMonthReport

[wxID_PANELREPORTMONTH, wxID_PANELREPORTMONTHBTNSEARCH, 
 wxID_PANELREPORTMONTHCBQUERY, 
] = [wx.NewId() for _init_ctrls in range(3)]

class PanelReportMonth(wx.Panel):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Panel.__init__(self, id=wxID_PANELREPORTMONTH,
              name=u'PanelReportMonth', parent=prnt, pos=wx.Point(22, 29),
              size=wx.Size(1059, 707), style=wx.TAB_TRAVERSAL)
        self.SetClientSize(wx.Size(1043, 669))
        self.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, False, u'Arial'))
        self.SetBackgroundColour(wx.Colour(183, 209, 173))

        self.btnSearch = wx.Button(id=wxID_PANELREPORTMONTHBTNSEARCH,
              label=u'\u67e5\u8be2', name=u'btnSearch', parent=self,
              pos=wx.Point(192, 32), size=wx.Size(72, 29), style=0)
        self.btnSearch.Bind(wx.EVT_BUTTON, self.OnBtnSearchButton,
              id=wxID_PANELREPORTMONTHBTNSEARCH)

        self.cbQuery = wx.ComboBox(choices=[], id=wxID_PANELREPORTMONTHCBQUERY,
              name=u'cbQuery', parent=self, pos=wx.Point(24, 32),
              size=wx.Size(152, 27), style=wx.CB_READONLY,
              value=u'\u9500\u552e\u989d')
        self.cbQuery.SetLabel(u'')

    def __init__(self, parent):
        self._init_ctrls(parent)
        
        self.queryType = {'daySale':u'月销售统计',}
        for data,label in self.queryType.items():
            self.cbQuery.Append(label, data)
        self.cbQuery.SetValue(u'月销售统计')
        
        self.lc = MyListCtrlSaleMonthReport(self)
        self.lc.SetSize(wx.Size(800, 450))
        self.lc.Move(wx.Point(22,100))

    def OnBtnSearchButton(self, event):
        self.lc.refresh()
